<p>评论列表</p>
<div>
  <ul>
    <li>可以使用 routerLink 及函数式用方法进行跳转；</li>
    <ul>两种方式传递 query 参数都需要使用 queryParams ；</ul>
    <ul>使用 ActivatedRoute.snapshot 能够快速获得路由此刻的一系列信息。</ul>
  </ul>
</div>
<div><button (click)="add()" class="btn btn-success">add </button> </div>
<div><button (click)="add2()" class="btn btn-success">add </button> </div>
<div *ngIf="1 >0">
  <table class="table">
    <thead>
    <tr>
      <th>id</th>
      <th>postId</th>
      <th>name</th>
      <th>email</th>
      <th>body</th>
      <th>操作</th>
      <th>操作</th>
      <th>操作</th>
      <th>操作</th>
      <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <tr *ngFor="let a of commentList;index as i ">
      <td>{{a.id}}</td>
      <td>{{a.postId}}</td>
      <td class="col-sm-3">{{a.name}}</td>
      <td class="col-3">{{a.email}}</td>
      <td class="col-3">{{a.body}}</td>
      <td>
        <button class="btn btn-primary btn-sm" routerLink="/study/comment-detail/{{a.id}}" routerLinkActive="active">
          详情
        </button>
      </td>
      <td>
        <button class="btn btn-primary btn-sm" routerLink="./../comment-detail/{{a.id}}" routerLinkActive="active">
          详情{{i}}</button>
      </td>

      <td>
        <button class="btn btn-primary" [routerLink]="['/study/comment-detail2', {id: a.id}]" >详情</button>
      </td>
      <td>
        <button class="btn btn-primary" [routerLink]="['/study/comment-detail',a.id]" >详情</button>
      </td>
      <td>
        <button class="btn btn-primary"  (click)="doGo(a.id)" >详情</button>
      </td>
      <td>
        <button class="btn btn-primary"  (click)="doGo2(a.id)" >详情</button>
      </td>
    </tr>

    </tbody>
  </table>
